#include <stdio.h>

int main()
{int m,n;
int i;
int t=1;
int sum=0;
scanf_s("%d %d",&m,&n);
for(i=m;i<=n&&i>=m;i++)
    {while(t<i)
    {if(i%t==0)
    {sum+=t;
    t++;}
    }
    if(sum==i)
        printf("%d",sum);
        else
            continue;
    }





    return 0;
}
